<template>
    <span>
        <span v-for="(item,index) in num" :key="index" @change="change">{{ index+1 }}: {{msg}}</span> 
    </span>
 
</template>

<script>
export default {
props:{
    num:Array,
    msg:String
},
data(){
    return{
        index:null
    }
},
methods:{
    change(){
        console.log(this.index);
        this.$emit('index',this.index)
    }
}
};
</script>

<style scoped>
.right {
  color: green;
}
.error {
  color: red;
}
.undo {
  color: #ccc;
}
</style>